package com.ssish.saas.eccs.mapper;

import com.ssish.saas.eccs.model.CovCondition;
import com.ssish.saas.eccs.model.CovConditionExample;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

public interface CovConditionMapper {
    long countByExample(CovConditionExample example);

    int deleteByExample(CovConditionExample example);

    @Insert({
        "insert into COV_CONDITION (CORP_CODE, PLAN_CODE, ",
        "COVERAGE_CODE, LIMIT_CODE, ",
        "FREQUENCY_CODE, PROVIDER_TYPE, ",
        "INVOICE_TYPE, COUNTRY, ",
        "START_DATE, SNO, ",
        "END_DATE, LASTEDIT_DATE, ",
        "USER_CODE, ACTIVE_FLAG, ",
        "LOA_DESC, MIN_VALUE, ",
        "MAX_VALUE, DEPENDENT_MAX_VALUE, ",
        "FAMILY_MAX_VALUE, YTD_LIMIT, ",
        "APPLY_YTD, CONDITION_TYPE, ",
        "ATTACH_CODE, PRINT_VALUE, ",
        "REJECT_CODE, IFCOND_TYPE, ",
        "IFCOND_GEVAL, IFCOND_LEVAL, ",
        "IFCOND_DEDUCTIBLE, IFCOND_COINSRMINCAP, ",
        "IFCOND_COINSRCAP, IFCOND_COINSRCAP_FREQUENCY, ",
        "IFCOND_EXCESS_COINSRCAP_MAXVAL, ITEM_GROUP_ENTITLED, ",
        "ANDCOND_TYPE, ANDCOND_GEVAL, ",
        "ANDCOND_LEVAL, ELSECOND_MAX_VALUE, ",
        "ELSECOND_FAMILY_MAX_VALUE, ELSECOND_DEPENDENT_MAX_VALUE, ",
        "ELSECOND_COINSRMINCAP, ELSECOND_COINSRCAP)",
        "values (#{corpCode,jdbcType=VARCHAR}, #{planCode,jdbcType=VARCHAR}, ",
        "#{coverageCode,jdbcType=CHAR}, #{limitCode,jdbcType=VARCHAR}, ",
        "#{frequencyCode,jdbcType=DECIMAL}, #{providerType,jdbcType=VARCHAR}, ",
        "#{invoiceType,jdbcType=CHAR}, #{country,jdbcType=VARCHAR}, ",
        "#{startDate,jdbcType=TIMESTAMP}, #{sno,jdbcType=DECIMAL}, ",
        "#{endDate,jdbcType=TIMESTAMP}, #{lasteditDate,jdbcType=TIMESTAMP}, ",
        "#{userCode,jdbcType=VARCHAR}, #{activeFlag,jdbcType=CHAR}, ",
        "#{loaDesc,jdbcType=VARCHAR}, #{minValue,jdbcType=DECIMAL}, ",
        "#{maxValue,jdbcType=DECIMAL}, #{dependentMaxValue,jdbcType=DECIMAL}, ",
        "#{familyMaxValue,jdbcType=DECIMAL}, #{ytdLimit,jdbcType=DECIMAL}, ",
        "#{applyYtd,jdbcType=CHAR}, #{conditionType,jdbcType=DECIMAL}, ",
        "#{attachCode,jdbcType=VARCHAR}, #{printValue,jdbcType=CHAR}, ",
        "#{rejectCode,jdbcType=DECIMAL}, #{ifcondType,jdbcType=VARCHAR}, ",
        "#{ifcondGeval,jdbcType=DECIMAL}, #{ifcondLeval,jdbcType=DECIMAL}, ",
        "#{ifcondDeductible,jdbcType=DECIMAL}, #{ifcondCoinsrmincap,jdbcType=DECIMAL}, ",
        "#{ifcondCoinsrcap,jdbcType=DECIMAL}, #{ifcondCoinsrcapFrequency,jdbcType=DECIMAL}, ",
        "#{ifcondExcessCoinsrcapMaxval,jdbcType=DECIMAL}, #{itemGroupEntitled,jdbcType=VARCHAR}, ",
        "#{andcondType,jdbcType=VARCHAR}, #{andcondGeval,jdbcType=DECIMAL}, ",
        "#{andcondLeval,jdbcType=DECIMAL}, #{elsecondMaxValue,jdbcType=DECIMAL}, ",
        "#{elsecondFamilyMaxValue,jdbcType=DECIMAL}, #{elsecondDependentMaxValue,jdbcType=DECIMAL}, ",
        "#{elsecondCoinsrmincap,jdbcType=DECIMAL}, #{elsecondCoinsrcap,jdbcType=DECIMAL})"
    })
    int insert(CovCondition record);

    int insertSelective(CovCondition record);

    List<CovCondition> selectByExample(CovConditionExample example);

    int updateByExampleSelective(@Param("record") CovCondition record, @Param("example") CovConditionExample example);

    int updateByExample(@Param("record") CovCondition record, @Param("example") CovConditionExample example);
}